﻿<%@ Page Language="C#" MasterPageFile="~/Template/List.master" AutoEventWireup="true"
    CodeFile="RoomApplyQuery.aspx.cs" Inherits="NewMeetingRoom_RoomApplyQuery" Title="Untitled Page" %>

<%@ Register Src="~/Control/ListHeader.ascx" TagName="ListHeader" TagPrefix="wsc" %>
<%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<%@ Register Assembly="Wicresoft.Common" Namespace="Wicresoft.Web.UI.WebControls"
    TagPrefix="wsc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>
        <%=Wicresoft.Busi.BizLogic.Util.SceneName%>
        查询</title>

    <script type="text/javascript">
        function getID(id) {
            document.getElementById('<%=tbSelectedID.ClientID %>').value = id;
        }

        function openAdd(id) {
            var url = "RoomApply.aspx?opener=Query&NoCache=" + Math.random();
            if (id != '')
                url = url + "&ApplyID=" + id;
            window.open(url,'newwindow','width=800px,height=600px,top=50px,left=200px');
        }
        
         function openEdit(id) {
            var url = "RoomApplyView.aspx?NoCache=" + Math.random();
            if (id != '')
                url = url + "&ApplyID=" + id;
            OpenDetail(url);
        }

        function searchClick() {
            //alert(window.event.keyCode);
            if (window.event.keyCode == 13) {
                document.getElementById("<%=btnSearch.ClientID %>").click(); return false;
            }
            return true;
        }

        function clearText(control, text) {
            if (control.value == text)
                control.innerText = "";
        }
        function insertText(control, text) {
            if (control.value == "")
                control.innerText = text;
        }
    </script>

    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitlePlaceHolder" runat="Server">
    <%=Wicresoft.Busi.BizLogic.Util.SceneName%>查询
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ListToolBarPlaceHolder" runat="Server">
    <div style="display: none">
        <asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" />
        <asp:TextBox ID="tbSelectedID" runat="server"></asp:TextBox>
    </div>
    <table cellspacing="2" cellpadding="0" border="0" width="100%">
        <tr>
            <td class="ToolMenu" width="80">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="openAdd('');">
                    <span>
                        <img src="<%=ResolveUrl("~/Images/Icon/Object/tz-add.gif")%>" alt="新 增" /></span><span>新
                            增</span>
                </div>
            </td>
            <td>
                <table cellspacing="0" cellpadding="0" border="0" class="TableSearch" width="100%">
                    <tr>
                        <td width="100%">
                            <asp:TextBox ID="tbSearch" runat="server" Style="width: 320px" CssClass="TextBox"></asp:TextBox>
                        </td>
                        <td width="10">
                            <asp:LinkButton ID="btnSearch" runat="server" OnClick="btnSearch_Click"><img alt="<%=SearchDefaultText %>" src="../Images/Icon/Icon-Search.png" align="absmiddle" style="cursor: pointer;" /></asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="AdvancedSearchPlaceHolder" runat="Server">
    <table cellspacing="3" cellpadding="0" border="0" width="100%">
        <tr>
            <td width="100" style="color: #15428b">
                <%=Wicresoft.Busi.BizLogic.Util.SceneName%>
                类型：
            </td>
            <td style="text-align: left">
                <asp:DropDownList ID="ddlRoomType" runat="server" Width="150px" CssClass="TextArea01">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td width="100" style="color: #15428b">
                <%=Wicresoft.Busi.BizLogic.Util.SceneName%>
                ：
            </td>
            <td style="text-align: left">
                <asp:DropDownList ID="ddlRoom" runat="server" Width="150px" CssClass="TextArea01">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td width="100" style="color: #15428b">
                类 型
            </td>
            <td style="text-align: left">
                <asp:DropDownList ID="ddlType" runat="server" Width="150px" CssClass="TextArea01">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td width="100" style="color: #15428b">
                会议名称：
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtTopic" runat="server" Width="150px" CssClass="TextArea01"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td width="100" style="color: #15428b">
                联系人：
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtRemark4" runat="server" Width="150px" CssClass="TextArea01"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td width="100" style="color: #15428b">
                当前状态：
            </td>
            <td style="text-align: left">
                <asp:DropDownList ID="ddlStatus" runat="server" Width="150px" CssClass="TextArea01">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td width="100" style="color: #15428b">
                领导：
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtRemark1" runat="server" Width="150px" CssClass="TextArea01"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td width="100" style="color: #15428b">
                使用日期：
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtDateFrom" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'});" runat="server"
                    Width="80px" CssClass="TextArea01"></asp:TextBox>&nbsp;-&nbsp;<asp:TextBox ID="txtDateTo"
                        onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'});" runat="server" Width="80px" CssClass="TextArea01"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <asp:Button ID="btnAdvancedSearch" runat="server" CssClass="Button01" Text="查询" OnClientClick=""
                    OnClick="btnAdvancedSearch_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ListHeaderPlaceHolder" runat="Server">
    <table cellspacing="0" cellpadding="0" border="0" class="PageGridHeader" width="100%">
        <wsc:ListHeader ID="lhTitle" runat="server" Title="联系人" OrderColumn="ApplicantName"
            Width="65" Align="center" />
        <wsc:ListHeader ID="lhPerson" runat="server" Title="会议名称" OrderColumn="Topic" Align="center" />
        <wsc:ListHeader ID="lhStatus" runat="server" Title="使用时间" Width="90" OrderColumn="MeetingDateCN"
            Align="center" />
        <wsc:ListHeader ID="lhSupplyTime" runat="server" Title="会议室" Width="90" OrderColumn="RoomName"
            Align="center" />
       <%-- <wsc:ListHeader ID="ListHeader2" runat="server" Title="用途" Width="90" OrderColumn="TypeCN"
            Align="center" />--%>
        <wsc:ListHeader ID="ListHeader1" runat="server" Title="申请时间" Width="90" OrderColumn="ApplyDate"
            Align="center" />
        <wsc:ListHeader ID="lhArrivalTime" runat="server" Title="状态" Width="60" OrderColumn="StatusCN"
            Align="center" />
    </table>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="ListContentPlaceHolder" runat="Server">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="MainInfolist">
        <asp:Repeater ID="rptApply" runat="server">
            <ItemTemplate>
                <tr id="TableRow_<%# Container.ItemIndex%>" style="cursor: hand; padding-top: 3px;"
                    class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="getID(this.id);ClickChangeClass(this);openEdit('<%#DataBinder.Eval(Container.DataItem,"ID") %>','<%#DataBinder.Eval(Container.DataItem,"StatusCN") %>');">
                    <%--<td>
                        <asp:CheckBox ID="cbSelect" runat="server" />
                    </td>--%>
                    <td align="center" width="65" title="<%# DataBinder.Eval(Container.DataItem, "ApplicantName")%>">
                        <%# DataBinder.Eval(Container.DataItem, "ApplicantName")%>
                    </td>
                    <td align="left" title="<%# DataBinder.Eval(Container.DataItem, "Topic")%>">
                        <%# WebCommon.Cut(DataBinder.Eval(Container.DataItem, "Topic"),10)%>
                    </td>
                    <td width="90" align="center" title='<%# DataBinder.Eval(Container.DataItem, "MeetingDateCN", "{0:yyyy-MM-dd}")%>'>
                        <%# DataBinder.Eval(Container.DataItem, "MeetingDateCN", "{0:yyyy-MM-dd}")%>
                    </td>
                    <td width="90" align="center" title="<%# DataBinder.Eval(Container.DataItem, "RoomName")%>">
                        <%# WebCommon.Cut(DataBinder.Eval(Container.DataItem, "RoomName"), 6)%>
                    </td>
                <%--    <td width="90" align="center" title="<%# DataBinder.Eval(Container.DataItem, "TypeCN")%>">
                        <%# WebCommon.Cut(DataBinder.Eval(Container.DataItem, "TypeCN"), 6)%>
                    </td>--%>
                    <td width="90" align="center">
                        <%# DataBinder.Eval(Container.DataItem, "ApplyDate","{0:yyyy-MM-dd}")%>
                    </td>
                    <td width="60" align="center">
                        <%# DataBinder.Eval(Container.DataItem, "StatusCN")%>
                    </td>
                    <%--<td align="center" width="30" style="text-align: center;">
                        <asp:ImageButton ID="ibtnDelete" ImageUrl="../Images/Icon/Action/delete.gif" runat="server"
                            OnClientClick="return confirm('是否删除?')" ToolTip="删除" CommandName="Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID")%>' />
                    </td>--%>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
</asp:Content>
